home *** CD-ROM | disk | FTP | other *** search
/ Digital Talk 55 / Digital_Talk_55_2002-06-10_Digital_Talk_de_Side_C.d64 / t&t joy + char (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  1KB  |  61 lines

  1. 0 :rem freisoft demo-spiel
  2. 1 :rem steuerung eines zeichens
  3. 2 :rem mit joystick oder tastatur
  4. 3 :rem (dirk breitinger  2002)
  5. 4 :
  6. 5 :
  7. 19 :goto2000:
  8. 20 :save"@0:t&t  joy+char",8:return:
  9. 21 :
  10. 22 :
  11. 23 :
  12. 140 :rem----joystick & tasten-abfrage
  13. 141 :geta$:j=31-peek(jo)and31:on-(j=.anda$="")goto141:ifj=.then:return
  14. 142 :ifjand1then:a$="[145]":return
  15. 143 :ifjand2then:a$="":return
  16. 144 :ifjand4then:a$="[157]":return
  17. 145 :ifjand8then:a$="":return
  18. 146 :a$=r$:return:---feuer
  19. 147 :
  20. 148 :
  21. 149 :
  22. 2000 :rem==============================
  23. 2001 :rem      variablen
  24. 2002 :rem==============================
  25. 2003 :
  26. 2004 :jo=56320:r$=chr$(13):fi$="[158][146][209][157]":
  27. 2005 :deffnp(a)=peek(peek(209)+peek(210)*256+pos(.)+a)
  28. 2006 :
  29. 2010 :print"[147][142]zeichen steuerung per joystick[159]":a=0
  30. 2011 :printtab(a)"        "
  31. 2012 :printtab(a)"        "
  32. 2013 :printtab(a)"   [146]   [146]  "
  33. 2014 :printtab(a)"        "spc(6)"e[159]"
  34. 2015 :printtab(a)"[146]        "spc(5)"[146][153][193][193][193][193]":
  35. 2016 :di=0
  36. 2020 :xa=0:xe=39:ya=1:ye=23::x=0:y=4
  37. 2098 :
  38. 2099 :
  39. 2100 :rem==============================
  40. 2101 :rem      steuerung
  41. 2102 :rem==============================
  42. 2105 :poke214,y:poke211,x:sys58640:
  43. 2106 :
  44. 2110 :print" [157]"a$fi$;
  45. 2111 :gosub140:
  46. 2112 :ifa$=""then:ifx<xethen:x=x+1:c=1:goto2130
  47. 2113 :ifa$="[157]"then:ifx>xathen:x=x-1:c=-1:goto2130
  48. 2114 :ifa$="[145]"then:ify>yathen:y=y-1:c=-40:goto2130
  49. 2115 :ifa$=""then:ify<yethen:y=y+1:c=40:goto2130
  50. 2120 :on1-(a$="[133]")-2*(a$="[148]")goto2111,2200,3300:
  51. 2126 :
  52. 2130 :rem---bewegungen auswerten
  53. 2131 :p=fnp(c)::ifp=32goto2110
  54. 2132 :ifp=65then:di=di+1:goto2110:
  55. 2133 :
  56. 2134 :ifp=133goto2140:rem---ende
  57. 2135 :y=y+(c>1)-(c<-1):x=x+(c=1)-(c=-1):goto2111:rem---keine bewegung
  58. 2140 :rem---ende
  59. 2141 :print" [157]"a$fi$;:poke214,18:printr$"gesammelt[146]:";di
  60. 2142 :gosub140:end
  61.